package com.treasure.mall.biz.service.core.product;

import com.treasure.mall.biz.base.SearchableCrudService;
import com.treasure.mall.biz.entity.product.SpecialAreaPO;
import com.treasure.mall.biz.entity.product.SpecialAreaProductPO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/6/22
 */
public interface SpecialAreaService extends SearchableCrudService<SpecialAreaProductPO, Long> {
    SpecialAreaPO addArea(String areaId, String title, String desc);

    SpecialAreaPO editArea(String areaId, String title, String desc);

    @Transactional
    void addProduct(Long productId, String... areaId);

    void removeProduct(Long id);

    List<SpecialAreaPO> areaList();

    SpecialAreaPO findAreaById(String id);

    List<SpecialAreaPO> findAreaAll();
}
